<template>
	<view>
		<uni-titles :title="title"></uni-titles>
		<uni-instruct :list="inslist"></uni-instruct>
		<view class="choosebox">
			<uni-inputs :title="'候物期'" :placeholder="'花季分化期'" icon readonly></uni-inputs>
			<uni-inputs :title="'操作时间'" :placeholder="'自动获取当前时间'" readonly :showBborder="false"></uni-inputs>
			<uni-inputs :title="'当日天气'" :placeholder="'自动获取'" readonly :showBborder="false"></uni-inputs>
		</view>
		<uni-menu :list="menulist" @mchange="mchange"></uni-menu>
		<uni-operations v-if="menuact==0" :list="buttonlist"></uni-operations>
		<template v-else="menuact==1">
			<uni-fertilizer :list='fertilizerlist'></uni-fertilizer>
		</template>
		<uni-imgs @changimgs="changimgs"></uni-imgs>
		<uni-supplement></uni-supplement>
		<uni-lastbtn :text="'保存'" @btnfun="btnfun"></uni-lastbtn>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '',
				inslist: [{
						name: '清水河小区1号地',
						value: '除草'
					},
					{
						name: '龙湖时代广场楼顶实验地',
						value: '除虫'
					},
				],
				menulist: [{
					name: '农事管理',
				}, {
					name: '用肥用药',
				}],
				menuact: 0,
				buttonlist: [{
						name: '巡园',
						id: 1,
						ischeck: true
					},
					{
						name: '灌水',
						id: 2
					},
					{
						name: '保花保果',
						id: 3
					},
					{
						name: '控销',
						id: 4
					},
					{
						name: '催花',
						id: 5
					},
					{
						name: '调花',
						id: 6
					},
					{
						name: '梳花',
						id: 7
					},
					{
						name: '疏果',
						id: 8
					},
					{
						name: '套袋',
						id: 9,
						ischeck: true
					},
					{
						name: '埋药',
						id: 10
					},
					{
						name: '修枝',
						id: 11
					},
					{
						name: '撑果',
						id: 12
					},
					{
						name: '环割环扎',
						id: 13
					},
					{
						name: '树干涂白',
						id: 14
					},
					{
						name: '嫁接',
						id: 15
					},
					{
						name: '清园',
						id: 16
					},
					{
						name: '环割环扎',
						id: 17
					},
					{
						name: '采收',
						id: 18
					},
					{
						name: '其他',
						id: 19
					}
				],
				fertilizerlist: [{
						name: '病虫害防治',
						img: ''
					}, {
						name: '植物营养',
						img: ''
					},
					{
						name: '草害',
						img: ''
					},
				]
			};
		},
		methods: {
			mchange(index) {
				this.menuact = index;
			},
			btnfun(d) {
				uni.showToast({
					title: d,
					icon: 'none'
				})
			},
		},
		onLoad(d) {
			this.title = d.title + '种植管理'
		}
	};
</script>

<style lang="scss">
	.choosebox{
		background: #fff;
		margin: 20rpx 30rpx 0;
		padding: 2rpx 0rpx;
		border-radius: 8rpx;
		box-sizing: border-box;
	}
</style>
